clc
clear
data=importdata("C:\Users\idzha\Desktop\jieguo\SiC/eDepe-.txt"); % eDepgamma  eDepproton eDepe-

x1=data.data(:,2);
y1=data.data(:,3);
%x1n=round(x1,2);
%y1n=round(y1,2);
value=data.data(:,4);
value = value/200000000/9;  %%%%% 这里注意阈值3.6还是多少 200000 200000000
%value=round(value,2);
x=linspace(-25,25,100);
y=linspace(-25,25,100);
[xx,yy]= meshgrid(x,y);
%zz=griddata(x1,y1,value,xx,yy);
%zzn=griddata(x1n,y1n,value,xx,yy);

value_reshape=reshape(value,100,100);

set(groot, 'DefaultAxesFontSize', 16, 'DefaultAxesFontName', "Times New Roman, SimSun");


%colormap('jet')
figure
surf(xx,yy,value_reshape);

pcolor(xx,yy,value_reshape);
shading interp
colorbar
%a=annotation('arrow',[0.3,0.4],[0.3,0.5],'LineStyle','-','Color','k','LineWidth',2);
%a.Color='red';

%b=text(-0.5,-0.6,'\fontsize{15}x=-0.18cm y=-0.05cm');
%c=text(-0.5,-0.7,'\fontsize{15}value=0.0134MeV');
%b.Color='red';
%c.Color='red';

%text(0.5,0.6,'x=0.5cm','Color','red','FontSize',15)
%text(0.5,0.5,'y=0.6cm','Color','red','FontSize',15)
%text(0.3,0.4,'Value=0.01443MeV','Color','red','FontSize',15)
xlabel('μm')
ylabel('μm')
filename = '11sanweitu.png';
print(gcf, filename, '-dpng', '-r300')


figure
plot(x,value_reshape(:,50),'*-',"LineWidth",3)
xlabel('μm')
ylabel('e-h/粒子')
legend("粒子入射方向")
filename = '11hengxiangfenbu.png';
print(gcf, filename, '-dpng', '-r300')


figure
plot(x,value_reshape(20,:),"LineWidth",3,"LineStyle","-")
xlabel('μm')
ylabel('e-h/粒子')


hold on
plot(x,value_reshape(45,:),'*-',"LineWidth",3)
legend("射程前端","射程末端")
filename = '11zongxiangfenbu.png';
print(gcf, filename, '-dpng', '-r300')


